= gitlab_ui_form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-protected-paths-settings'), html: { class: 'fieldset-form' } do |f|
  = form_errors(@application_setting)

  %fieldset
    .form-group
      = f.gitlab_ui_checkbox_component :throttle_protected_paths_enabled,
        _('Enable rate limiting for requests to the specified paths'),
        help_text: _('Helps reduce request volume for protected paths.')
    .form-group
      = f.label :throttle_protected_paths_requests_per_period, _('Maximum requests per period per user')
      = f.number_field :throttle_protected_paths_requests_per_period, class: 'form-control gl-form-input'
    .form-group
      = f.label :throttle_protected_paths_period_in_seconds, _('Rate limit period (in seconds)')
      = f.number_field :throttle_protected_paths_period_in_seconds, class: 'form-control gl-form-input'
    .form-group
      = f.label :protected_paths do
        = _('Paths with rate limiting for POST requests')
      = f.text_area :protected_paths_raw, placeholder: '/users/sign_in,/users/password', class: 'form-control gl-form-input', rows: 10
    .form-group
      = f.label :protected_paths_for_get_request_raw do
        = _('Paths with rate limiting for GET requests')
      = f.text_area :protected_paths_for_get_request_raw, class: 'form-control gl-form-input', rows: 10
      %span.form-text.gl-text-subtle
        - link = link_to('', 'https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-a-relative-url-for-gitlab', target: '_blank', rel: 'noopener noreferrer')
        = safe_format(_('All paths are relative to the GitLab URL. Do not include %{relative_url_link_start}relative URLs%{relative_url_link_end}.'), tag_pair(link, :relative_url_link_start, :relative_url_link_end))

  = f.submit _('Save changes'), pajamas_button: true
